package com.manzhushaka.demo;

import com.manzhushaka.demo.bean.UserService;
import com.manzhushaka.demo.config.AppConfig;
import com.manzhushaka.spring.ApplicationContext;

public class Main {

    public static void main(String[] args) {

        ApplicationContext context = new ApplicationContext(new AppConfig());

        UserService userService = (UserService) context.getBean("userService");

        System.out.println(userService);

        userService.hello();

        //调用userService当中的demoHello方法，这个方法会调用依赖当中的demoService的hello方法
        userService.demoHello();

    }

}
